/*
*	Created:			06.03.10
*	Author:				009
*	Last Modifed:		-
*/

// SDK
#include "SDK/amx/amx.h"
#include "SDK/plugincommon.h"
// plugin
#include "os.h"
#include "main.h"
// npc core
#include "NPC class.h"

extern	CNPC*	NPC[MAX_NPCS];

THREAD_START(NPCSyncThread){
	int npcid;
	while(true)
	{
		for(npcid = 0;npcid < MAX_NPCS;npcid++)
		{
			if(!NPC[npcid]) continue;
			if(NPC[npcid]->IsActive()) 
			{
				NPC[npcid]->Sync();
			}
		}
		SLEEP(50);
	}
THREAD_END
